package com.xiaobao.mapper;

import com.xiaobao.pojo.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;


//用户信息
@Mapper
public interface UserInfoMapper {
    //获取用户信息
    UserInfo getUserInfo(String id);

    //更新用户信息
    @Options(flushCache = Options.FlushCachePolicy.TRUE)  // 删除跟新时清除缓存
    boolean UpdateUserInfo(UserInfo userInfo);

    //删除用户信息
    @Options(flushCache = Options.FlushCachePolicy.TRUE)  // 删除跟新时清除缓存
    boolean deleteUserInfo(String id);

    //添加默认用户信息
    @Options(flushCache = Options.FlushCachePolicy.TRUE)  // 删除跟新时清除缓存
    void addDefaultUserInfo(String id, String userName);
}
